import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a=1,b=2,c=a+b;
        if(n==0) c = 0;
        if(n==1) c = 1;
        if(n==2) c = 2;
        for(int i=3;i<=n;i++) {
            c = a+b;
            a = b;
            b = c;
        }
        System.out.print(c);
    }
}